<template>
  <el-dialog :title="title" :visible.sync="dialogFormVisible" width="1300px" v-loading="loading">
    <el-steps :active="applyModifyStatus" align-center style="margin-bottom:20px">
      <el-step v-for="(item, index) in stepList" :key="index" :title="item.label" :description="item.time"></el-step>
    </el-steps>

    <el-tabs v-model="activeName">
      <el-tab-pane label="批单后" name="first">
        <el-form :model="form" class="viewOrExamine" ref="form" label-width="160px">
          <el-card class="box-card" shadow="never">
            <div slot="header" class="clearfix">
              <span>基本信息（点击数据即可复制）</span>
            </div>
            <el-row :gutter="4">
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">基本信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="保单号" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.insureNum)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureNum')}">{{ beforeBatchOrder.insureNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="订单号" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.orderNum)" :class="{'cursorPointer': true, 'colorRed': isColorRed('orderNum')}">{{ beforeBatchOrder.orderNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="投保时间" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.payTime)" :class="{'cursorPointer': true, 'colorRed': isColorRed('payTime')}">{{ beforeBatchOrder.payTime }}</span>
                </el-form-item></el-col>
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">投保人/被投保人信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="投保人" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.insureName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureName')}">{{ beforeBatchOrder.insureName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="证件类型">
                  <span @click="copyClick(beforeBatchOrder.insureCertificateType * 1
    === 1
    ? '身份证'
    : '统一社会信用代码')" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureCertificateType')}">{{ beforeBatchOrder.insureCertificateType * 1
    === 1
    ? '身份证'
    : '统一社会信用代码' }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item style="width: 100%" label="证件号码">
                  <span @click="copyClick(beforeBatchOrder.insureCertificateNumber)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureCertificateNumber')}">{{ beforeBatchOrder.insureCertificateNumber
                }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="被投保人" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.insuredName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insuredName')}">{{ beforeBatchOrder.insuredName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="证件类型">
                  <span @click="copyClick(beforeBatchOrder.insuredCertificateType *
    1 === 1
    ? '身份证'
    : '统一社会信用代码')" :class="{'cursorPointer': true, 'colorRed': isColorRed('insuredCertificateType')}">{{ beforeBatchOrder.insuredCertificateType *
    1 === 1
    ? '身份证'
    : '统一社会信用代码' }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item style="width: 100%" label="证件号码">
                  <span @click="copyClick(beforeBatchOrder.insuredCertificateNumber)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insuredCertificateNumber')}">{{
    beforeBatchOrder.insuredCertificateNumber }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="联系人" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.contactName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('contactName')}">{{ beforeBatchOrder.contactName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="联系方式">
                  <span @click="copyClick(beforeBatchOrder.contactPhone)" :class="{'cursorPointer': true, 'colorRed': isColorRed('contactPhone')}">{{ beforeBatchOrder.contactPhone }}</span>
                </el-form-item></el-col>

              <el-col :span="8"><el-form-item label="险种">
                  <span @click="copyClick(beforeBatchOrder.templateCode.includes('gnhy-slhy') ? '水路货运险' : '公路货运险')" :class="{'cursorPointer': true, 'colorRed': isColorRed('templateCode')}">{{ beforeBatchOrder.templateCode.includes('gnhy-slhy') ? '水路货运险' : '公路货运险' }}</span>
                </el-form-item></el-col>
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">货运信息</div>
                </div>
              </el-col>
              <!-- <el-col :span="8"><el-form-item label="标记发票号码运单号">
              <span @click="copyClick(row.tagInvoiceWaybill)" class="cursorPointer">{{ row.tagInvoiceWaybill }}</span>
            </el-form-item></el-col>
          <el-col :span="8"><el-form-item label="包装和数量">
              <span @click="copyClick(row.containerCount)" class="cursorPointer">{{ row.containerCount }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="货物类型" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.insureGoodsName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureGoodsName')}">{{ beforeBatchOrder.insureGoodsName}}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="货物名称" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.goodsName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('goodsName')}">{{ beforeBatchOrder.goodsName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="包装" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.packName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('packName')}">{{ beforeBatchOrder.packName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="集装箱号" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.containerNumber)" :class="{'cursorPointer': true, 'colorRed': isColorRed('containerNumber')}">{{ beforeBatchOrder.containerNumber }}</span>
                </el-form-item></el-col>

              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">运输信息</div>
                </div>
              </el-col>
              <!-- <el-col :span="8"><el-form-item label="运输工具" style="width: 100%">
              <span @click="copyClick(row.transportTool)" class="cursorPointer">{{ row.transportTool }}</span>
            </el-form-item></el-col>
          <el-col :span="8"><el-form-item label="航次/车牌号" style="width: 100%">
              <span @click="copyClick(row.shipNumber)" class="cursorPointer">{{ row.shipNumber }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="运输方式" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.transportTypeName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('transportTypeName')}">{{ beforeBatchOrder.transportTypeName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="启运地" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.startPlace)" :class="{'cursorPointer': true, 'colorRed': isColorRed('startPlace')}">{{ beforeBatchOrder.startPlace }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="8"><el-form-item label="中转地" style="width: 100%">
              <span @click="copyClick(row.middlePlace)" class="cursorPointer">{{ row.middlePlace }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="目的地" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.endPlace)" :class="{'cursorPointer': true, 'colorRed': isColorRed('endPlace')}">{{ beforeBatchOrder.endPlace }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="启运日期" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.startTime)" :class="{'cursorPointer': true, 'colorRed': isColorRed('startTime')}">{{ beforeBatchOrder.startTime }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="24">
            <div style="overflow: hidden; margin: 12px 0">
              <div
                style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "
              ></div>
              <div style="float: left">扩展保险责任</div>
            </div>
          </el-col> -->
              <!-- <el-col :span="24"
            ><el-form-item label="" style="width: 100%">
              <span @click="copyClick(row.insureExtendId)" class="cursorPointer">{{ row.insureExtendId }}</span>
            </el-form-item></el-col
          > -->
              <div style="overflow: hidden; margin: 12px 0">
                <div style="
                width: 2px;
                height: 14px;
                float: left;
                margin-right: 5px;
                background-color: #1890ff;
                margin-top: 3px;
              "></div>
                <div style="float: left">费用信息</div>
              </div>
              <el-col :span="8"><el-form-item label="保险金额" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.totalFee)" :class="{'cursorPointer': true, 'colorRed': isColorRed('totalFee')}">{{ beforeBatchOrder.totalFee }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="保险费率（单位‰）" style="width: 100%">
                  <span @click="copyClick(beforeInsureRateNum)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureRate')}">{{ beforeInsureRateNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="保险费用" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.insureFee)" :class="{'cursorPointer': true, 'colorRed': isColorRed('insureFee')}">{{ beforeBatchOrder.insureFee }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="8"
            ><el-form-item label="已优惠费率" style="width: 100%">
              <span @click="copyClick(row.discountRate)" class="cursorPointer">{{ row.discountRate }}</span>
            </el-form-item></el-col
          >
          <el-col :span="8"
            ><el-form-item label="已优惠费用" style="width: 100%">
              <span @click="copyClick(row.discountedFees)" class="cursorPointer">{{ row.discountedFees }}</span>
            </el-form-item></el-col
          > -->
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">发票信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="开具发票" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.invoiceStatus * 1 ? '是' : '否')" :class="{'cursorPointer': true, 'colorRed': isColorRed('invoiceStatus')}">{{ beforeBatchOrder.invoiceStatus * 1 ? '是' : '否'
                }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="发票类型" style="width: 100%">
                  <span @click="copyClick(beforeBatchOrder.invoiceStatus * 1 === 2 ? '专票' : beforeBatchOrder.invoiceStatus * 1 === 1 ? '普票' : '')"
                  :class="{'cursorPointer': true, 'colorRed': isColorRed('invoiceStatus')}">{{ beforeBatchOrder.invoiceStatus * 1 === 2 ? '专票' : beforeBatchOrder.invoiceStatus * 1 === 1 ? '普票' : '' }}</span>
                </el-form-item></el-col>
            </el-row>
            <div v-if="row.invoiceStatus * 1">
              <el-row>
                <el-col :span="8">
                  <el-form-item label="发票抬头">
                    <span @click="copyClick(beforeBatchOrder.invoiceHead)" :class="{'cursorPointer': true, 'colorRed': isColorRed('invoiceHead')}">{{ beforeBatchOrder.invoiceHead }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="统一信用代码（税号）">
                    <span @click="copyClick(beforeBatchOrder.creditCode)" :class="{'cursorPointer': true, 'colorRed': isColorRed('creditCode')}">{{ beforeBatchOrder.creditCode }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="收件人电话">
                    <span @click="copyClick(beforeBatchOrder.consigneePhone)" :class="{'cursorPointer': true, 'colorRed': isColorRed('consigneePhone')}">{{ beforeBatchOrder.consigneePhone }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="收件人邮箱">
                    <span @click="copyClick(beforeBatchOrder.consigneeMail)" :class="{'cursorPointer': true, 'colorRed': isColorRed('consigneeMail')}">{{ beforeBatchOrder.consigneeMail }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="银行名称">
                    <span @click="copyClick(beforeBatchOrder.bankBranchName)" :class="{'cursorPointer': true, 'colorRed': isColorRed('bankBranchName')}">{{ beforeBatchOrder.bankBranchName }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="银行账号">
                    <span @click="copyClick(beforeBatchOrder.bankAccount)" :class="{'cursorPointer': true, 'colorRed': isColorRed('bankAccount')}">{{ beforeBatchOrder.bankAccount }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="电话号码">
                    <span @click="copyClick(beforeBatchOrder.companyPhone)" :class="{'cursorPointer': true, 'colorRed': isColorRed('companyPhone')}">{{ beforeBatchOrder.companyPhone }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="单位地址">
                    <span @click="copyClick(beforeBatchOrder.registerAddress)" :class="{'cursorPointer': true, 'colorRed': isColorRed('registerAddress')}">{{ beforeBatchOrder.registerAddress }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="24"><el-form-item label="备注">
                    <span @click="copyClick(beforeBatchOrder.remark)" :class="{'cursorPointer': true, 'colorRed': isColorRed('remark')}">{{
                  row.remark }}</span></el-form-item></el-col>
              </el-row>
            </div>
          </el-card>
          <!-- <el-col :span="24"
        ><el-form-item label="备注">
          <el-input
            type="textarea"
            v-model="form.desc"
          ></el-input> </el-form-item
      ></el-col> -->
        </el-form>
      </el-tab-pane>
      <el-tab-pane label="批单前" name="second">
        <el-form :model="form" class="viewOrExamine" ref="form" label-width="160px">
          <el-card class="box-card" shadow="never">
            <div slot="header" class="clearfix">
              <span>基本信息（点击数据即可复制）</span>
            </div>
            <el-row :gutter="4">
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">基本信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="保单号" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.insureNum)" class="cursorPointer">{{ frontModifyInsureHistory.insureNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="订单号" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.orderNum)" class="cursorPointer">{{ frontModifyInsureHistory.orderNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="投保时间" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.payTime)" class="cursorPointer">{{ frontModifyInsureHistory.payTime }}</span>
                </el-form-item></el-col>
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">投保人/被投保人信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="投保人" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.insureName)" class="cursorPointer">{{ frontModifyInsureHistory.insureName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="证件类型">
                  <span @click="copyClick(frontModifyInsureHistory.insureCertificateType * 1
    === 1
    ? '身份证'
    : '统一社会信用代码')" class="cursorPointer">{{ frontModifyInsureHistory.insureCertificateType * 1
    === 1
    ? '身份证'
    : '统一社会信用代码' }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item style="width: 100%" label="证件号码">
                  <span @click="copyClick(frontModifyInsureHistory.insureCertificateNumber)" class="cursorPointer">{{ frontModifyInsureHistory.insureCertificateNumber
                }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="被投保人" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.insuredName)" class="cursorPointer">{{ frontModifyInsureHistory.insuredName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="证件类型">
                  <span @click="copyClick(frontModifyInsureHistory.insuredCertificateType *
    1 === 1
    ? '身份证'
    : '统一社会信用代码')" class="cursorPointer">{{ frontModifyInsureHistory.insuredCertificateType *
    1 === 1
    ? '身份证'
    : '统一社会信用代码' }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item style="width: 100%" label="证件号码">
                  <span @click="copyClick(frontModifyInsureHistory.insuredCertificateNumber)" class="cursorPointer">{{
    row.insuredCertificateNumber }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="联系人" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.contactName)" class="cursorPointer">{{ frontModifyInsureHistory.contactName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="联系方式">
                  <span @click="copyClick(frontModifyInsureHistory.contactPhone)" class="cursorPointer">{{ frontModifyInsureHistory.contactPhone }}</span>
                </el-form-item></el-col>

              <el-col :span="8"><el-form-item label="险种">
                  <span @click="copyClick(frontModifyInsureHistory.templateCode.includes('gnhy-slhy') ? '水路货运险' : '公路货运险')" class="cursorPointer">{{ frontModifyInsureHistory.templateCode.includes('gnhy-slhy') ? '水路货运险' : '公路货运险' }}</span>
                </el-form-item></el-col>
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">货运信息</div>
                </div>
              </el-col>
              <!-- <el-col :span="8"><el-form-item label="标记发票号码运单号">
              <span @click="copyClick(row.tagInvoiceWaybill)" class="cursorPointer">{{ row.tagInvoiceWaybill }}</span>
            </el-form-item></el-col>
          <el-col :span="8"><el-form-item label="包装和数量">
              <span @click="copyClick(row.containerCount)" class="cursorPointer">{{ row.containerCount }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="货物类型" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.insureGoodsName)" class="cursorPointer">{{ frontModifyInsureHistory.insureGoodsName}}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="货物名称" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.goodsName)" class="cursorPointer">{{ frontModifyInsureHistory.goodsName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="包装" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.packName)" class="cursorPointer">{{ frontModifyInsureHistory.packName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="集装箱号" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.containerNumber)" class="cursorPointer">{{ frontModifyInsureHistory.containerNumber }}</span>
                </el-form-item></el-col>

              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">运输信息</div>
                </div>
              </el-col>
              <!-- <el-col :span="8"><el-form-item label="运输工具" style="width: 100%">
              <span @click="copyClick(row.transportTool)" class="cursorPointer">{{ row.transportTool }}</span>
            </el-form-item></el-col>
          <el-col :span="8"><el-form-item label="航次/车牌号" style="width: 100%">
              <span @click="copyClick(row.shipNumber)" class="cursorPointer">{{ row.shipNumber }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="运输方式" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.transportTypeName)" class="cursorPointer">{{ frontModifyInsureHistory.transportTypeName }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="启运地" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.startPlace)" class="cursorPointer">{{ frontModifyInsureHistory.startPlace }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="8"><el-form-item label="中转地" style="width: 100%">
              <span @click="copyClick(row.middlePlace)" class="cursorPointer">{{ row.middlePlace }}</span>
            </el-form-item></el-col> -->
              <el-col :span="8"><el-form-item label="目的地" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.endPlace)" class="cursorPointer">{{ frontModifyInsureHistory.endPlace }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="启运日期" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.startTime)" class="cursorPointer">{{ frontModifyInsureHistory.startTime }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="24">
            <div style="overflow: hidden; margin: 12px 0">
              <div
                style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "
              ></div>
              <div style="float: left">扩展保险责任</div>
            </div>
          </el-col> -->
              <!-- <el-col :span="24"
            ><el-form-item label="" style="width: 100%">
              <span @click="copyClick(row.insureExtendId)" class="cursorPointer">{{ row.insureExtendId }}</span>
            </el-form-item></el-col
          > -->
              <div style="overflow: hidden; margin: 12px 0">
                <div style="
                width: 2px;
                height: 14px;
                float: left;
                margin-right: 5px;
                background-color: #1890ff;
                margin-top: 3px;
              "></div>
                <div style="float: left">费用信息</div>
              </div>
              <el-col :span="8"><el-form-item label="保险金额" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.totalFee)" class="cursorPointer">{{ frontModifyInsureHistory.totalFee }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="保险费率（单位‰）" style="width: 100%">
                  <span @click="copyClick(insureRateNum)" class="cursorPointer">{{ insureRateNum }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="保险费用" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.insureFee)" class="cursorPointer">{{ frontModifyInsureHistory.insureFee }}</span>
                </el-form-item></el-col>
              <!-- <el-col :span="8"
            ><el-form-item label="已优惠费率" style="width: 100%">
              <span @click="copyClick(row.discountRate)" class="cursorPointer">{{ row.discountRate }}</span>
            </el-form-item></el-col
          >
          <el-col :span="8"
            ><el-form-item label="已优惠费用" style="width: 100%">
              <span @click="copyClick(row.discountedFees)" class="cursorPointer">{{ row.discountedFees }}</span>
            </el-form-item></el-col
          > -->
              <el-col :span="24">
                <div style="overflow: hidden; margin: 12px 0">
                  <div style="
                  width: 2px;
                  height: 14px;
                  float: left;
                  margin-right: 5px;
                  background-color: #1890ff;
                  margin-top: 3px;
                "></div>
                  <div style="float: left">发票信息</div>
                </div>
              </el-col>
              <el-col :span="8"><el-form-item label="开具发票" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.invoiceStatus * 1 ? '是' : '否')" class="cursorPointer">{{ frontModifyInsureHistory.invoiceStatus * 1 ? '是' : '否'
                }}</span>
                </el-form-item></el-col>
              <el-col :span="8"><el-form-item label="发票类型" style="width: 100%">
                  <span @click="copyClick(frontModifyInsureHistory.invoiceStatus * 1 === 2 ? '专票' : frontModifyInsureHistory.invoiceStatus * 1 === 1 ? '普票' : '')"
                    class="cursorPointer">{{ frontModifyInsureHistory.invoiceStatus * 1 === 2 ? '专票' : frontModifyInsureHistory.invoiceStatus * 1 === 1 ? '普票' : '' }}</span>
                </el-form-item></el-col>
            </el-row>
            <div v-if="row.invoiceStatus * 1">
              <el-row>
                <el-col :span="8">
                  <el-form-item label="发票抬头">
                    <span @click="copyClick(frontModifyInsureHistory.invoiceHead)" class="cursorPointer">{{ frontModifyInsureHistory.invoiceHead }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="统一信用代码（税号）">
                    <span @click="copyClick(frontModifyInsureHistory.creditCode)" class="cursorPointer">{{ frontModifyInsureHistory.creditCode }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="收件人电话">
                    <span @click="copyClick(frontModifyInsureHistory.consigneePhone)" class="cursorPointer">{{ frontModifyInsureHistory.consigneePhone }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="收件人邮箱">
                    <span @click="copyClick(frontModifyInsureHistory.consigneeMail)" class="cursorPointer">{{ frontModifyInsureHistory.consigneeMail }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="银行名称">
                    <span @click="copyClick(frontModifyInsureHistory.bankBranchName)" class="cursorPointer">{{ frontModifyInsureHistory.bankBranchName }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="银行账号">
                    <span @click="copyClick(frontModifyInsureHistory.bankAccount)" class="cursorPointer">{{ frontModifyInsureHistory.bankAccount }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="电话号码">
                    <span @click="copyClick(frontModifyInsureHistory.companyPhone)" class="cursorPointer">{{ frontModifyInsureHistory.companyPhone }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item label="单位地址">
                    <span @click="copyClick(frontModifyInsureHistory.registerAddress)" class="cursorPointer">{{ frontModifyInsureHistory.registerAddress }}</span>
                  </el-form-item>
                </el-col>
                <el-col :span="24"><el-form-item label="备注">
                    <span @click="copyClick(frontModifyInsureHistory.remark)" class="cursorPointer">{{
                  row.remark }}</span></el-form-item></el-col>
              </el-row>
            </div>
          </el-card>
          <!-- <el-col :span="24"
        ><el-form-item label="备注">
          <el-input
            type="textarea"
            v-model="form.desc"
          ></el-input> </el-form-item
      ></el-col> -->
        </el-form>
      </el-tab-pane>
    </el-tabs>
    <div slot="footer" class="dialog-footer">
      <!-- <el-button type="primary" @click="copyClick(JSON.stringify(row))">复制全部</el-button> -->

      <el-button @click="dialogFormVisible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getLabel } from "@/utils/func.js";
const Decimal = require("decimal.js");

const status = [
  {
    label: "申请修改",
    value: "1",
  },
  {
    label: "修改通过",
    value: "2",
  },
  {
    label: "修改不通过",
    value: "3",
  },
];
export default {
  computed: {
    insureRateNum() {
      if (this.frontModifyInsureHistory.insureRate) {
        const num1 = new Decimal(this.frontModifyInsureHistory.insureRate);
        const num2 = new Decimal("10");
        // 执行乘法运算
        const result = num1.times(num2);
        // 输出结果
        return result;
      } else {
        return 0;
      }
    },
    beforeInsureRateNum() {
      if (this.beforeBatchOrder.insureRate) {
        const num1 = new Decimal(this.beforeBatchOrder.insureRate);
        const num2 = new Decimal("10");
        // 执行乘法运算
        const result = num1.times(num2);
        // 输出结果
        return result;
      } else {
        return 0;
      }
    }
  },
  data() {
    return {
      activeName: "first",
      loading: false,
      headers: { "Content-Type": "multipart/form-data" },
      insureUrl: "",
      title: "查看",
      dialogFormVisible: false,
      form: {
        insureNum: "",
      },
      stepList: [],
      row: {
        templateCode: "",
      },
      beforeBatchOrder: {
        templateCode: ''
      },
      frontModifyInsureHistory: {
        templateCode: ''
      },
      crj: "fff",
      file: null,
      applyModifyStatus: 0,
    };
  },
  methods: {
    isColorRed(name) {
      if (this.beforeBatchOrder[name] === this.frontModifyInsureHistory[name]) {
        return false
      } else {
        return true
      }
    },
    getProcess(orderNum) {
      this.showFollowing = true;
      this.$post("/warranty/modify/process", {
        orderNum,
      }).then((res) => {
        this.stepList = [];
        res.data.forEach((item) => {
          this.stepList.push({
            label: getLabel(status, item.applyModifyStatus),
            time: item.createTime || item.updateTime,
          });
        });
        this.applyModifyStatus = res.data.length ? res.data.length : 0;
      });
    },
    onSuccess(res, file) {
      if (res.code * 1 === 200) {
        this.info.businessLicense = file;
        this.$message.suucess("上传成功");
      } else {
        this.$message.error("上传失败");
      }
    },
    beforeUpload(file) {
      this.file = file;
      if (
        file.type !== "image/jpeg" &&
        file.type !== "image/png" &&
        file.type !== "image/jpg"
      ) {
        this.$message.warning("请上传图片");
        return false;
      }
      return true;
    },
    uploadFile() {
      this.loading = true;
      const headers = {
        "Content-Type": "multipart/form-data",
      };
      const formData = new FormData();
      formData.append("file", this.file);
      this.$post("/file/upload", formData, headers)
        .then((res) => {
          this.insureUrl = res.data;
        })
        .catch(() => {
          this.fileList = [];
        })
        .finally(() => {
          this.loading = false;
        });
    },
    copyClick(data) {
      var input = document.createElement("input"); // 创建input标签
      input.value = data; // 将input的值设置为需要复制的内容
      document.body.appendChild(input); // 添加input标签
      input.select(); // 选中input标签
      document.execCommand("copy"); // 执行复制
      this.$message.success("复制成功"); // 成功提示信息
      document.body.removeChild(input); // 移除input标签
    },
    returnPolicy() {
      if (!this.form.insureNum) {
        this.$message.error("请填写保单号");
        return;
      }
      const params = {
        warrantyId: this.row.warrantyId,
        insureUrl: this.insureUrl,
        insureNum: this.form.insureNum,
      };
      this.$post(`/warranty/insure/upInfo`, params).then((res) => {
        this.$message.success("回传成功"); // 成功提示信息
        this.$emit("initTable");
      });
    },
  },
};
</script>
<style scoped lang="scss">
.viewOrExamine::v-deep {
  .el-form-item {
    margin-bottom: 8px;
  }
}

.colorRed {
  color: red;
}

.cursorPointer {
  cursor: pointer;
}
</style>